This chapter presents a brief tour of UserLand Frontier using lots of screen shots and a limited amount of commentary. Its purpose is to help you get acquainted with the elements and capabilities of Frontier so that you have a framework within which to understand the rest of this book.Put on your explorer's hat. We can't tell you everything about the software in this tour. But don't be afraid to take detours or tinker with aspects of the product that you find interesting. You can quit without saving changes, or use the Revert command on the File menu, which is a good safety valve in case you make a bunch of changes and then can't figure out how to get back where you started. It's a good idea, too, to use the Backup command in the UserLand menu to create a backup of the primary Frontier file before you make any changes.
This chapter begins with a brief discussion of the several types of files that make up Frontier's environment. Then it moves through the main components of Frontier, in the following order:
The chapter concludes with an example of a typical, though abbreviated, Frontier session, where you'll create a new object in the database, write a short script to make use of it, define a menu, and attach a script to a menu item to work with the newly created object.
- the Main Window
- the Quick Script window
- the Object Database and Table Windows (where we'll also discuss variables briefly)
- word processing windows
- outline windows
- the Menubar Window (where we'll also see where scripts connected to the Menubar are stored)
Stripped to its barest bones, Frontier consists of just two files: the application and a file called Frontier.root. The Frontier.root file -- which you'll come to think of as simply "the root" -- is where Frontier stores all of its information. Your Frontier scripts and their associated data will also be stored in this file. In addition, you may find the Object Database that is at the heart of this file to be a handy place to keep lots of other information. We'll have much more to say on this subject in Chapter 6, which is devoted entirely to the Object Database.
As you work with Frontier, you will probably create or use at least two other kinds of files: desktop script files and import/export files. These two file types have identical icons.
A desktop script file is similar to a Macintosh stand-alone application except that it can't run without Frontier. There are a number of these files included with Frontier (in the "Desktop Scripts" folder); you may create others. If you double-click on a desktop script icon, it will launch Frontier (if Frontier is not already running) and then execute the script(s) contained in the file. To edit the desktop script instead of running it, hold down the Command key while you double-click the file; continue holding until the script opens in Frontier.
Import/export files contain Frontier objects which have been exported from the root file to share with others or keep as a separate backup. If you double-click an exported Frontier file, it will launch Frontier (unless Frontier is already running) and then ask you where you want to store the object you are about to import. It presents as a default the location from which it was exported; that's usually where you want to put it.
When you launch Frontier you'll see a small window -- about the size of a title bar -- with a close box, a down arrow for a popup menu, some text, a flag and a resize box (see Figure 2-1).
Figure 2-1. Frontier's Main WindowThis window is called the Main Window. When you click on the flag at the right end of the window, the window gets taller, revealing four previously hidden buttons (see Figure 2-2). If you save Frontier with the window in this condition, it will open this way next time you launch Frontier. You can also move the window to a different place on the screen; the location will be remembered.
Figure 2-2. Main Window Expanded to Show ButtonsEach of the four buttons in the expanded Main Window opens a window showing something from the Object Database. "Menu Bar" gets you to the menu editor window. That's where you edit or change the commands in the menubar, or the scripts linked into them. "Object DB" opens a table editor window showing the top level of the Frontier Object Database. "Quick Script" opens a window where you can type short commands to Frontier. "Tech Support" displays a small dialog with help resources. This button's behavior is implemented as a script; you can customize it as you see fit.
Normally, the Main Window in Frontier displays version information about Frontier, the amount of memory available, the current time, and how many "threads" are running. (Alas, threads are beyond the scope of this chapter.) You can call one of Frontier's built-in verbs to display your own message in this window. As you open other windows, the Main Window may get hidden. To bring it to the front, select "Frontier.root" from the Windows menu. When it's in front, you can change the font, size and style for the message text; just select the desired combination from the Edit menu.
Note that the buttons are just convenient shortcuts; see Chapter 7 for the equivalent menu commands.
Contents Page | Next Section -- Quick Scripts